﻿using System.Web.Mvc;
using DemoLib.Shared.Contracts;
using DemoLib.Shared.Models;

namespace Mvc3Demo.Controllers
{
    public class AccountController : BaseController
    {
        public AccountController(IUserService userService)
        {
            ;
        }

        [HttpGet]
        public ActionResult Logon()
        {
            var model = new LogOnModel();
            return View(model);
        }

        [HttpPost]
        public ActionResult Logon(LogOnModel model)
        {
            if (ModelState.IsValid)
            {
                return RedirectToAction("Index", "Home");
            }

            return View(model);
        }

        public ActionResult LogOff()
        {
            return RedirectToAction("Index", "Home");
        }
    }
}
